package de.dhbw.karlsruhe.picsim.gui.editor;

import de.dhbw.karlsruhe.picsim.model.memory.RegisterValue;
import de.dhbw.karlsruhe.picsim.model.memory.impl.RegisterValueImpl;
import org.jetbrains.annotations.Nullable;

/**
 * Created by IntelliJ IDEA.
 * User: user
 * Date: May 2, 2010
 * Time: 12:03:24 PM
 */

public final class DataMemoryEditor extends AbstractPicEditor<RegisterValue> {

    @Override
    protected int parseObject(final RegisterValue value) {
        return value.asInteger();
    }

    @Override
    @Nullable
    protected Object parseUserInput(final int result) {
        return RegisterValueImpl.createSafe(result);
    }
}
